<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>CaseHD - Cadastro de Usuários</title>
        <link rel="stylesheet" type="text/css" href="css/generics.css">
    </head>
    <body>
        <%@include file="/inc/menu.jsp" %>
        <Form name="form" action="/casehd/usuario/salvar" method="post">
            <div class="seg12black">
            <table>
                <tr>
                    <td>Nome:</td>
                    <td><input type="text" name="usuario.nome" ></td>
                </tr>
                <tr>
                    <td>Login</td>
                    <td><input type="text" name="usuario.login" ></td>
                </tr>
                <tr>
                    <td>Senha</td>
                    <td><input type="password" name="usuario.senha" ></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td><input type="submit" value="Salvar" name="Salvar"></td>
                </tr>
            </table>
            </div>
            <div class="seg12Erro">
                ${msg}
            </div>
        </Form>
        <hr>
        Número de registros: ${linhas}
        <table border="1" width="500px">
            <tr bgcolor="#AACCAA">
                <td width="100px">ID</td>
                <td width="300px">Usuário</td>
                <td width="100px">Login</td>
            </tr>
            <tr>
                <c:forEach var="usuario" items="${lista}">
                    <td>
                        <c:out value="${usuario.id}"/><br>
                    </td>
                    <td>
                        <c:out value="${usuario.nome}"/><br>
                    </td>
                    <td>
                        <c:out value="${usuario.login}"/><br>
                    </td>
            </tr>
            </c:forEach>
        </table>
    </body>
</html>
